Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 10 - AppleTalk Addressing / AppleTalk Addressing Reference
Functions


OTSetNBPType

Stores the type part of an NBP name in an NBP entity structure.

C INTERFACE
Boolean OTSetNBPType(NBPEntity* nbpEntity, const char* type);
C++ INTERFACES
None. C++ applications use the C interface to this function.

PARAMETERS
nbpEntity
A pointer to the NBP entity structure in which you wish to store an address.
type
A pointer to the type portion of an NBP name string that you wish to store.
DESCRIPTION
The OTSetNBPType function stores the NBP type specified by the type parameter into the NBP entity structure indicated by the nbpEntity parameter, deleting any previous type stored there. The type supplied must not have any escape characters stored in it, although you do not receive any error message if you do use such characters. This function returns false if the type parameter is longer than the maximum allowed for type part of an NBP name (32 characters).

SPECIAL CONSIDERATIONS
When you store all or part of an NBP name in an NBP entity structure, do not include the backslash as an escape character. The NBP entity extraction functions insert a backslash (\) in front of any backslash, colon (:), or at-sign (@) they find in an NBP name so that mapper functions can use a correctly formatted NBP name.

SEE ALSO
The NBP entity structure is described in the section "The NBP Entity Structure," beginning on page 10-20.

The NBP address structure is described in the section "The NBP Address Structure," beginning on page 10-17.

To store the name and zone parts of an NBP name in an NBP entity structure, use the OTSetNBPName function (page 10-31) and the OTSetNBPZone function (page 10-34), respectively.

To extract the name, type, and zone parts of an NBP name in an NBP entity structure, use the OTExtractNBPName function (page 10-35), the OTExtractNBPType function (page 10-36), and the OTExtractNBPZone function (page 10-37), respectively.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996